//
//  WinHelp.m
//  HealthAsk
//
//  Created by liyuhang on 12-8-21.
//  Copyright 2012年 __MyCompanyName__. All rights reserved.
//

#import "WinHelp.h"
#import "MainWin.h"


@implementation WinHelp
+(CCScene *) scene
{
	// 'scene' is an autorelease object.
	CCScene *scene = [CCScene node];
	
	// 'layer' is an autorelease object.
	WinHelp *layer = [[WinHelp alloc] init];
	
	// add layer as a child to scene
	[scene addChild: layer];
    
  	// return the scene
	return scene;
}
-(WinHelp*)init
{
    if ((self=[super init])) {
        NSString * helpMessage = [NSString stringWithFormat:@"给好评喔！！！"];
        CCLabelTTF* m_pLabelHelp = [CCLabelTTF labelWithString:helpMessage fontName:@"Marker Felt" fontSize:40];
        CGSize size = [[CCDirector sharedDirector] winSize];
        // position the label on the center of the screen
        m_pLabelHelp.position =  ccp( size.width/2, size.height/2  );
        [self addChild:m_pLabelHelp];
        
        NSString * _pSelgameShop = @"返回";
        CCMenuItem *_itemSel4 = [CCMenuItemFont itemWithString:_pSelgameShop block:^(id sender) {
            [[CCDirector sharedDirector] replaceScene:[CCTransitionFade transitionWithDuration:1.0 scene:[MainWin scene] withColor:ccWHITE]];
        }];
        [_itemSel4 setPosition:ccp(30,30)];        // Leaderboard Menu Item using blocks
        
        m_pMenu = [CCMenu menuWithItems: _itemSel4, nil];
        [m_pMenu setPosition:ccp(0,0)];
		[self addChild:m_pMenu];    }
    return self;
}


@end
